﻿using System;

namespace Borg
{
    [Serializable]
    public class Tag : MetaElement
    {
        private readonly Slot _slot;
        private readonly Plug _plug;

        public Slot Slot
        {
            get { return _slot; }
        }

        public Plug Plug
        {
            get { return _plug; }
        }

        internal Tag(int id, string name, Slot slot, Plug plug)
            : base(id, name)
        {
            _slot = slot;
            _plug = plug;
        }

        internal override AssemblyElement GetAssemblyElement()
        {
            return _slot.SlotType.SlotDefinition.Contract;
        }
    }
}
